package com.jason.designpattern.creational.factorymethod;
public class OperationDiv extends Operation {

	@Override
	public double getResult() {
		if (getNumberB() == 0) {
			throw new ArithmeticException("除数不能为0。");
		}
		return getNumberA() / getNumberB();
	}

}
